<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('订单商品关联列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>订单ID：</label>
                                <input type="text" name="orderId"/>
                            </li>
                            <li>
                                <label>订单表父订单ID：</label>
                                <input type="text" name="parentOrderId"/>
                            </li>
                            <li>
                                <label>商品id：</label>
                                <input type="text" name="goodsId"/>
                            </li>
                            <li>
                                <label>父级id：</label>
                                <input type="text" name="parentOrderGoodsId"/>
                            </li>
                            <li>
                                <label>商品编码：</label>
                                <input type="text" name="sku"/>
                            </li>
                            <li>
                                <label>主数据sku 名称：</label>
                                <input type="text" name="skuName"/>
                            </li>
                            <li>
                                <label>货号：</label>
                                <input type="text" name="goodsSn"/>
                            </li>
                            <li>
                                <label>购买数量：</label>
                                <input type="text" name="number"/>
                            </li>
                            <li>
                                <label>标题：</label>
                                <input type="text" name="title"/>
                            </li>
                            <li>
                                <label>规格简述value:value...：</label>
                                <input type="text" name="resume"/>
                            </li>
                            <li>
                                <label>列表图：</label>
                                <input type="text" name="listImg"/>
                            </li>
                            <li>
                                <label>商品描述：</label>
                                <input type="text" name="description"/>
                            </li>
                            <li>
                                <label>原价：</label>
                                <input type="text" name="price"/>
                            </li>
                            <li>
                                <label>单价：</label>
                                <input type="text" name="discountPrice"/>
                            </li>
                            <li>
                                <label>优惠减免：</label>
                                <input type="text" name="discountTitle"/>
                            </li>
                            <li>
                                <label>小计：</label>
                                <input type="text" name="subtotal"/>
                            </li>
                            <li>
                                <label>实际小记：</label>
                                <input type="text" name="realSubtotal"/>
                            </li>
                            <li>
                                <label>院余编号：</label>
                                <input type="text" name="posCardNo"/>
                            </li>
                            <li>
                                <label>总优惠额度：</label>
                                <input type="text" name="discountFee"/>
                            </li>
                            <li>
                                <label>退款：</label>
                                <input type="text" name="refundMoney"/>
                            </li>
                            <li>
                                <label>退款原因：</label>
                                <input type="text" name="refundMsg"/>
                            </li>
                            <li>
                                <label>退商品数量：</label>
                                <input type="text" name="refundGoodsNum"/>
                            </li>
                            <li>
                                <label>订单回调扩展参数：</label>
                                <input type="text" name="orderExtend"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="mall:goods:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="mall:goods:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="mall:goods:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="mall:goods:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('mall:goods:edit')}]];
        var removeFlag = [[${@permission.hasPermi('mall:goods:remove')}]];
        var prefix = ctx + "mall/goods";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "订单商品关联",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'id',
                    title: '${comment}',
                    visible: false
                },
                {
                    field: 'orderId',
                    title: '订单ID'
                },
                {
                    field: 'parentOrderId',
                    title: '订单表父订单ID'
                },
                {
                    field: 'goodsId',
                    title: '商品id'
                },
                {
                    field: 'parentOrderGoodsId',
                    title: '父级id'
                },
                {
                    field: 'sku',
                    title: '商品编码'
                },
                {
                    field: 'skuName',
                    title: '主数据sku 名称'
                },
                {
                    field: 'goodsType',
                    title: '商品类型 1-产品 2-护理 3-券 4-疗程'
                },
                {
                    field: 'goodsSn',
                    title: '货号'
                },
                {
                    field: 'goodsStatus',
                    title: '状态 -1-已退款 0-正常 1-取消 2-超时取消'
                },
                {
                    field: 'number',
                    title: '购买数量'
                },
                {
                    field: 'title',
                    title: '标题'
                },
                {
                    field: 'resume',
                    title: '规格简述value:value...'
                },
                {
                    field: 'listImg',
                    title: '列表图'
                },
                {
                    field: 'description',
                    title: '商品描述'
                },
                {
                    field: 'price',
                    title: '原价'
                },
                {
                    field: 'discountPrice',
                    title: '单价'
                },
                {
                    field: 'discountTitle',
                    title: '优惠减免'
                },
                {
                    field: 'discountInfo',
                    title: '打折信息'
                },
                {
                    field: 'subtotal',
                    title: '小计'
                },
                {
                    field: 'realSubtotal',
                    title: '实际小记'
                },
                {
                    field: 'posCardNo',
                    title: '院余编号'
                },
                {
                    field: 'discountFee',
                    title: '总优惠额度'
                },
                {
                    field: 'refundMoney',
                    title: '退款'
                },
                {
                    field: 'refundMsg',
                    title: '退款原因'
                },
                {
                    field: 'refundGoodsNum',
                    title: '退商品数量'
                },
                {
                    field: 'orderExtend',
                    title: '订单回调扩展参数'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>